<% width ||= 120 %>
<% height ||= 72 %>
<% css_class ||= 'img-thumbnail border-0' %>

<% if theme.screenshot.attached? && theme.screenshot.variable? %>
  <%= image_tag(spree_image_url(theme.screenshot, width: width, height: height), class: css_class, loading: :lazy) %>
<% elsif theme.class.preview_image_url.present? %>
  <%= image_tag(
  theme.class.preview_image_url,
  class: css_class,
  loading: :lazy
) %>
<% else %>
  <div class="rounded bg-light text-muted d-flex align-items-center justify-content-center img-fluid" style="height: <%= height %>px">
    <%= icon('camera-off', class: 'text-muted opacity-50') %>
  </div>
<% end %>